package com.edgar.oom;

/**
 * -Xss128k
 * @author 张雨舟
 *
 */
public class JavaVMStackSOF {
	
	private int stackLength = 1;
	
	public void stackLeak() {
		stackLength ++;
		stackLeak();
	}

	public static void main(String[] args) {
		JavaVMStackSOF oom = new JavaVMStackSOF();
		try {
			oom.stackLeak();
		} catch (Throwable e) {
			System.err.println(oom.stackLength);
			e.printStackTrace();
		}
	}

}
